package com.base.jvm;

import java.lang.reflect.Method;
import java.lang.reflect.Parameter;

/**
 * create by yongli on 2020-04-12 16:40
 */

public class GetProperty {

    public static void main(String[] names) throws NoSuchMethodException{
        String name = System.getProperty("name");
        System.out.println("the name is :" + name);

        Method method = GetProperty.class.getMethod( "main", String[].class );
        for( final Parameter parameter: method.getParameters() ) {
            System.out.println( "Parameter: " + parameter.getName() );
        }
    }
}
